package com.csxy.six.config;

import com.csxy.six.JwtUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class JwtConfig {

    @Bean
    public JwtUtils jwtUtils(
            @Value("${jwt.secret}") String secret,
            @Value("${jwt.expire}") long expire) {

        // 移除Base64解码，直接使用原始密钥字符串
        return new JwtUtils(secret, expire);
    }
}